<div class="content">
  <h1 mat-dialog-title class="title">添加部门</h1>
  <form  #departmentForm="ngForm">
    <div mat-dialog-content class="department-form">
    <mat-form-field appearance="standard">
      <mat-label>部门名称</mat-label>
      <input matInput required [(ngModel)]="department.departName" name="departName">
      <mat-error *ngIf="messages.departName">{{ messages.departName }}</mat-error>
    </mat-form-field>

    <mat-form-field appearance="standard">
      <mat-label>部门描述</mat-label>
      <textarea matInput [(ngModel)]="department.description" name="description" ></textarea>
      <mat-error *ngIf="messages.description">{{ messages.description }}</mat-error>
    </mat-form-field>


</div>
  <div mat-dialog-actions class="buttons">
    <button mat-button (click)="onSubmit()">确认</button>
    <button mat-button [mat-dialog-close] cdkFocusInitial>取消</button>
  </div>
  </form>
</div>
